/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model.Entity.Web;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author user12
 */
@Embeddable
public class StaffCourseContentPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "COURSE_NO")
    private BigInteger courseNo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ACTIVITY_CODE")
    private BigInteger activityCode;
    @Basic(optional = false)
    @NotNull
    @Column(name = "INSTRUCTOR_ID")
    private BigInteger instructorId;

    public StaffCourseContentPK() {
    }

    public StaffCourseContentPK(BigInteger courseNo, BigInteger activityCode, BigInteger instructorId) {
        this.courseNo = courseNo;
        this.activityCode = activityCode;
        this.instructorId = instructorId;
    }

    public BigInteger getCourseNo() {
        return courseNo;
    }

    public void setCourseNo(BigInteger courseNo) {
        this.courseNo = courseNo;
    }

    public BigInteger getActivityCode() {
        return activityCode;
    }

    public void setActivityCode(BigInteger activityCode) {
        this.activityCode = activityCode;
    }

    public BigInteger getInstructorId() {
        return instructorId;
    }

    public void setInstructorId(BigInteger instructorId) {
        this.instructorId = instructorId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (courseNo != null ? courseNo.hashCode() : 0);
        hash += (activityCode != null ? activityCode.hashCode() : 0);
        hash += (instructorId != null ? instructorId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof StaffCourseContentPK)) {
            return false;
        }
        StaffCourseContentPK other = (StaffCourseContentPK) object;
        if ((this.courseNo == null && other.courseNo != null) || (this.courseNo != null && !this.courseNo.equals(other.courseNo))) {
            return false;
        }
        if ((this.activityCode == null && other.activityCode != null) || (this.activityCode != null && !this.activityCode.equals(other.activityCode))) {
            return false;
        }
        if ((this.instructorId == null && other.instructorId != null) || (this.instructorId != null && !this.instructorId.equals(other.instructorId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.WebStaffCourseContentPK[ courseNo=" + courseNo + ", activityCode=" + activityCode + ", instructorId=" + instructorId + " ]";
    }
    
}
